package com.rybbaby.tss.front.tssMemberAttendClassRecord.dao;

import com.rybbaby.tss.core.bean.PageBean;
import com.rybbaby.tss.core.web.dao.IGenericDao;
import com.rybbaby.tss.front.tssMemberAttendClassRecord.entity.TssMemberAttendClassRecord;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author 雷春琼
 * @description 会员报班记录表数据库操作接口
 * @createDate 2017-08-24 下午2:43:28
 */
public interface ITssMemberAttendClassRecordDao extends IGenericDao<TssMemberAttendClassRecord> {


    /**
     * 获取该会员id下指定报班记录
     * @param lessonIds
     * @param memberid
     * @return
     */
    List<TssMemberAttendClassRecord> getAttendClassListBylessonIdsAndMemberId(String lessonIds,String memberid);

    /**
     * 根据班级id级会员课时包Id查询已报班未未考勤的课节id
     * @param targetdataId
     * @param memberPackageId
     * @return
     */
    List<Map<String,Object>> getChangeClassLessons(String targetdataId,String memberPackageId);

    /**
     * 根据会员课时包和班级id查询已报班信息
     *
     * @param memberPackageId
     * @param classId
     * @return
     */
    public List<Map<String, Object>> classDateList(String memberPackageId, String classId);

    /**
     * 根据会员课时包id分组查询会员报班记录
     *
     * @param memberPackageId
     * @return
     */
    PageBean tssMemberAttendClassRecordListGroupByClass(String memberPackageId, Integer pageNo, Integer pageSize);

    /**
     * 根据学生id会员,课时包id,班级id查询学生的报班情况
     *
     * @param memberId
     * @param memberPackageId
     * @param classId
     * @return
     */
    List<Map<String, Object>> getMemberAttendClassDetailList(String memberId, String memberPackageId, String classId);


    /**
     * 通过会员查询报班班级名称和课程名称
     *
     * @param memberId
     * @return
     */
    List<Map<String, Object>> getAttendClassDetailList(String memberId, Integer type);


    /**
     * 通过会员查询报班课节详情
     *
     * @param memberId
     * @param classId
     * @return
     */
    List<Map<String, Object>> getAttendClassLessonsDetailList(String memberId, String classId);

    /**
     *把未上课的课节改为已转班
     *
     * @param memberId
     * @param memberPackageId
     * @return
     */
    Integer updateNoClassLessionChangealreadyClass(Integer status,String memberId, String memberPackageId,String targetDataId);

    Map<String,Object> findByLessonsId(String s1, Date classTime, String memberId);

    List<TssMemberAttendClassRecord> findAttendClassRecordByLessonsIdMemberId(String memberId, String id)throws Exception;

    /**
     * 根据会员课时包id和班级id查询会员报班情况
     * @param memberPackageId
     * @param classId
     * @return
     */
    List<Map<String,Object>> findAttendClassByClassIdAndMemberPackageId(String memberPackageId,String classId);

    /**
     * 根据课节id和班级id查询会员可以报班信息
     * @param classId
     * @return
     */
    List<Map<String,Object>> findCouldClassLessonInfoByClassIdAndMemberPackageId(String memberPackageId,String classId);

    /**
     * 根据课节id和班级id查询会员可以报班信息
     * @param classId
     * @return
     */
    List<Map<String,Object>> findCouldClassLessonInfoByClassIdAndMemberPackageId(String classId);
}
